<!DOCTYPE HTML>
<html class="reftest-wait">
<body style="width:500px; border:2px solid black;">
<div style="width:300px; height:300px; background:yellow; float:left;"></div>
<div style="width:300px; height:400px;">
  <span style="display:inline-block; outline:3px solid cyan">
    <span style="display:inline-block; width:0; height:0; outline:5px solid red" id="d"></span>
  </span>
</div>
<script>
window.addEventListener("MozReftestInvalidate", function() {
  d.style.width = "300px";
  d.style.height = "100px";
  document.documentElement.removeAttribute("class");
});
</script>
</body>
